Generally, in order to encode an audio or video signal, data is quantized and lossless encoding is then performed on the quantized data.